package com.jzo2o.customer.controller.agency;

import com.jzo2o.customer.model.dto.request.AgencyCertificationAuditAddReqDTO;
import com.jzo2o.customer.service.IAgencyCertificationAuditService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @author itcast
 */
@RestController("agencyAgencyCertificationAuditController")
@RequestMapping("/agency/agency-certification-audit")
@Api(tags = "机构端 - 提交认证相关接口")
public class AgencyCertificationAuditController {

    @Resource
    private IAgencyCertificationAuditService agencyCertificationAuditService;

    /**
     * 4.2.2.1 机构提交认证申请
     */
    @PostMapping
    @ApiOperation("机构提交认证申请")
    public void add(@RequestBody AgencyCertificationAuditAddReqDTO agencyCertificationAuditAddReqDTO) {
        agencyCertificationAuditService.addAgencyCertification(agencyCertificationAuditAddReqDTO);
    }

    /**
     * 4.2.1.2 查询最新的驳回原因
     */
    @GetMapping("/rejectReason")
    @ApiOperation("查询最新的驳回原因")
    public Map<String, String> queryRejectReason() {
        return agencyCertificationAuditService.queryRejectReason();
    }

}
